{% extends "base.html" %}
{% load i18n account dv_filters %}
{% block head_title %}{{ page_title }}{% endblock %}
{% block content %}
    {% if season %}
        <h2>{{ season.begin|date:"F Y"|title }} - {{ season.end|date:"F Y" }} ({{ season.cantons|cantons_abbr:False|join:", " }})</h3>
    {% endif %}
    <h3>{{ page_title }}</h3>

    <table class="table table-bordered table-striped">
    <thead>
        <tr>
            <th>{# Attributs #}</th>
            <th>{% trans "Prénom" %}</th>
            <th>{% trans "Nom" %}</th>
            <th>{% trans "Natel" %}</th>
            <th>{% trans "Email" %}</th>
        </tr>
    </thead>
    <tbody>
    {% for user in users %}
        <tr>
            <td class="small">
                {{ user.profile.formation_icon|safe }}
                {{ user.profile.actor_icon|default:"" }}
            </td>
            <td>{{ user.first_name }}</td>
            <td>{{ user.last_name }}</td>
            <td>
              {% if user.profile.natel %}{{ user.profile.natel|tel_link }}{% elif user.profile.phone %}{{ user.profile.phone|tel_link }}{% endif %}
            </td>
            <td>{% if user.email %}<a href="mailto:{{ user.profile.mailtolink|urlencode }}">{{ user.email }}</a>{% endif %}</td>
        </tr>
    {% endfor %}
    </tbody>
    </table>

    {% include 'export_buttons.html' with printonly=True %}
{% endblock %}
